
using System;
using System.Collections.Generic;
using FairyGUI;
namespace Wwo
{
    public class NpcListView : Window
    {
        GList m_List;
        public NpcListView()
        {
            UIObjectFactory.SetPackageItemExtension("ui://WaterWorld/NpcItem", typeof(NpcItem));
        }

        protected override void OnInit()
        {
            this.contentPane = UIPackage.CreateObject("WaterWorld", "NpcList").asCom;

            float x = GRoot.inst.width / 2 - this.contentPane.width / 2;
            this.SetXY(x, 10);

            //
            m_List = this.contentPane.GetChild("listItems").asList;
            for (int i = 0; i < 3; i++)
            {
                NpcItem item = (NpcItem)m_List.AddItemFromPool();
                item.setIcon("ui://sw31oo7zd42pca");
                item.setTitle("尼古拉斯");
            }
        }

        override protected void OnShown()
        {
        }
    }
}